from fastapi import APIRouter
from pydantic import Field

from rosa.scarborough_fair import BaseResponse

router = APIRouter()


class HealthResponse(BaseResponse):
    message: str = Field(default="Online!")
    data: dict = Field(default={"question": "Are you OK?", "answer": "Yes!"})


@router.get("/health", response_model=HealthResponse, summary="健康检查")
async def health():
    """
    健康检查，返回常量字符串
    \f
    :return:
    """
    return HealthResponse()
